#pragma once

#include <iostream>
#include <GL/gl.h>
#include <SFML/Graphics.hpp>
#include "Unit.hpp"

using namespace sf;

namespace TheEmpires
{

	class Renderer
	{

		public:
			Renderer(RenderWindow* _mWindow);
			~Renderer();

			void SetWindow(int width, int height);

			bool StartFrame();
			void EndFrame();

			void EnableClipper(Rectangle area);
			void DisableClipper();

			void DrawRectangle(Color color, Vector2f position, Vector2f size, float rotation = 0.0f);
			void DrawSprite(Sprite* sprite, Vector2f position, Vector2f size = Vector2f(0, 0), IntRect renderarea = IntRect(0, 0, 0, 0), float rotation = 0.0f);

		protected:
			int mWidth;
			int mHeight;
			RenderWindow* mWindow;

	};

}
